Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement callbacks for python solvers #361

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented May 16, 2024

We add a callback hook for:

  • ARS
  • CGP
  • lazy A*
  • LRT A*
  • MaxentIRL
  • POMCP
  • sb3 wrapper

A callback is a function, called at each solver's iteration, taking the solver as argument and returning a boolean. If returning True, the solver stops.

We also make some intermediate results attributes from the solver to be accessible in the callback.

And add limited docstring so that the signature of solvers __init__() will show in the doc with the callback behaviour documented.

We add a callback hook for:
- ARS
- CGP
- lazy A*
- LRT A*
- MaxentIRL
- POMCP
- sb3 wrapper

A callback is a function, called at each solver's iteration,  taking the solver as argument
and returning a boolean. If returning True, the solver stops.

We also make some intermediate results attributes from the solver to be
accessible in the callback.

And add limited docstring so that the signature of solvers __init__()
will show in the doc with the callback behaviour documented.
@fteicht fteicht self-assigned this May 17, 2024
@fteicht fteicht self-requested a review May 17, 2024 13:56
@fteicht fteicht added the enhancement New feature or request label May 17, 2024
@fteicht fteicht merged commit 2825563 into airbus:master May 17, 2024
33 checks passed
@nhuet nhuet deleted the python-cb branch May 28, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants